Skip to content

Fix wrong comparison syntax#86

Merged
sergio-costas merged 1 commit intocanonical:24from
sergio-costas:fix-bash-comparison
Mar 26, 2025
Merged

Fix wrong comparison syntax#86
sergio-costas merged 1 commit intocanonical:24from
sergio-costas:fix-bash-comparison

Conversation

@sergio-costas
Copy link
Copy Markdown

Bash complains that == is being used where = should be. To use ==, double brackets must be used.

Copy link
Copy Markdown

@nteodosio nteodosio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go for the portable syntax [ "$session_type" = "KDE" ], but the script is #!/bin/bash so this is good too.

@sergio-costas
Copy link
Copy Markdown
Author

You are right... better use the portable way. I'll change it.

This patch fixes a warning from Bash
@sergio-costas sergio-costas merged commit 92d5ac9 into canonical:24 Mar 26, 2025
1 check passed
@3v1n0
Copy link
Copy Markdown

3v1n0 commented Mar 27, 2025

FYI, it would have been nice to use quoted variables too, just in case

@sergio-costas
Copy link
Copy Markdown
Author

@3v1n0 In fact... #89 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants